package com.bdqn.ch01.controller;

import com.bdqn.ch01.service.PracticeService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class HelloController {
    @Resource
    private PracticeService practiceService;

    @Value("${com.bdqn.name}")
    private String name;
    @Value("${com.bdqn.email}")
    private String email;

    @RequestMapping("/hello")
    public String hello(){

        return practiceService.sayHello()+name+"  "+email;
    }
}
